<template>
	<view>
		<uni-card :is-shadow="false" style="height: 130px;" v-for="(item,index) in Hesuans" :key="index">
			<view style="float: left;width: 300px;height: 130px;">
				<p style="font-size: 18px;color: #555555;margin-top: 10px;">新冠肺炎检测报告</p>
				<p style="font-size: 16px;color: #555555;margin-top: 15px;">检测结果：
				<span style="color: lawngreen;font-size: 18px;" v-if="item.result == '阴性'">{{item.result}}</span>
				<span style="color: red;font-size: 18px;" v-if="item.result == '阳性'">{{item.result}}</span>
				</p>
				<p style="font-size: 16px;color: #555555;margin-top: 10px;">检测时间：{{item.createTime}}</p>
			</view>
			
		</uni-card>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				patient: {},
				Hesuans:[],
			}
		},
		created() {
			this.patient = uni.getStorageSync('patient')
			console.log(this.patient)
			this.getHesuans()
		},
		methods: {
			getHesuans(){
				this.$axios.get("/record/record/nucleic-report/getHesuans/" + this.patient.id).then((
						res) => {
				
						this.Hesuans = res.data.data.list
						console.log(this.Hesuans)
				
					}) //请求成功
					.catch((error) => {
						console.log(error);
					});
			}
		}
	}
</script>

<style>

</style>
